﻿'Params
'artist (Required) : An artist name.
'album (Required) : An album name.
'public (Optional): Optionally show in the sharing users activity feed. Defaults to 0 (false).
'message (Optional): An optional message to send with the recommendation. If not supplied a default message will be used.
'recipient (Required): Email Address | Last.fm Username - A comma delimited list of email addresses or Last.fm usernames. Maximum is 10.
'api_key (Required) : A Last.fm API key.
'api_sig (Required) : A Last.fm method signature. See authentication for more information.
'sk (Required) : A session key generated by authenticating a user via the authentication protocol. 
'Auth
' This service requires authentication. Please see our authentication how-to.
' This is a write service and must be accessed with an HTTP POST request. All parameters should be sent in the POST body, including the 'method' parameter. See rest requests for more information. 

Public Structure AlbumShareResponse

End Structure

Public Class AlbumShare
	Inherits BaseRequest
	Dim artist As String
	Dim album As String
	Dim public_ As String
	Dim message As String
	Dim recipient As String

	Public xmlresponse As XDocument = Nothing

	Public Sub New(artist As String, album As String, public_ As String, message As String, recipient As String)
		Me.artist = artist
		Me.album = album
		Me.public_ = public_
		Me.message = message
		Me.recipient = recipient

	End Sub

    Public Sub sendRequest()
        ClearMembers()

        AddMember("method", "album.share")
        AddMember("artist", artist, True)
        AddMember("album", album, True)
        AddMember("public_", public_, False)
        AddMember("message", message, False)
        AddMember("recipient", recipient, True)

        AddMember("api_key", My.Settings.api_key, False)

        xmlresponse = sendGETResponse(True)
    End Sub

	Public Function getResponse() As AlbumShareResponse

		Return New AlbumShareResponse
	End Function

End Class
